package com.springboot.demo.Dao;

import com.springboot.demo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface UserDao {
    //通过id得到user对象
    User findById(Integer id);
    //遍历user对象
    List<User> listUser();

    //增加user
   //    @Insert("INSERT INTO t_user(name,age) VALUES(#{name},#{age})")
    void addUser(User user);

    //删除user
    int delUser(int id);

    //更改user
    int updateUser(User user);

}
